//
//  CantripWorldDocument.h
//  Cantrip
//
//  Created by James Callender on Wed Apr 24 2002.
//  Copyright (c) 2001 James Callender. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "CantripPluginManager.h"
#import "CantripWorldController.h"
#import "CantripWorldWindow.h"

@class CantripWorldController;

extern NSString *WorldVersionString;
extern NSString *WorldVersionKey;
extern NSString *WorldDataKey;

extern NSString *WorldDataAddressKey;
extern NSString *WorldDataPortKey;
extern NSString *WorldConnectOnOpenKey;
extern NSString *WorldDataEchoKey;
extern NSString *WorldReturnStyleKey;
extern NSString *WorldClearInputKey;
extern NSString *WorldEnableMCCP;

extern NSString *WorldSmartScrollingKey;
extern NSString *WorldSpellCheckingKey;
extern NSString *WorldSmartInsertDeleteKey;

extern NSString *WorldFontNameKey;
extern NSString *WorldFontSizeKey;
extern NSString *WorldTabSizeKey;
extern NSString *WorldScrollbackKey;
extern NSString *WorldDisplayRowsKey;
extern NSString *WorldDisplayColsKey;
extern NSString *WorldEchoColor;
extern NSString *WorldMessagesColor;
extern NSString *WorldDisplayForegroundColorKey;
extern NSString *WorldDisplayBackgroundColorKey;
extern NSString *WorldBoldIntenseColorsKey;
extern NSString *WorldEnableIntenseColorsKey;
extern NSString *WorldEnableANSIColorsKey;
extern NSString *WorldEnableTextBlinkingKey;
extern NSString *WorldStandardANSIColorsKey;
extern NSString *WorldIntenseANSIColorsKey;
extern NSString *WorldInputBackgroundColorKey;
extern NSString *WorldInputForegroundColorKey;
extern NSString *WorldInputFontNameKey;
extern NSString *WorldInputFontSizeKey;

// Telnet options
extern NSString *WorldHandleNAWSKey;
extern NSString *WorldPasswordPromptKey;
extern NSString *WorldHandleEraseCharacterKey;
extern NSString *WorldHandleEraseLineKey;
extern NSString *WorldHandleStatusPromptKey;
extern NSString *WorldClientTypeKey;

@interface CantripWorldDocument : NSPersistentDocument
{
    NSMutableDictionary *mWorldData;
    NSMutableArray      *mWorldWindows;
    int                 counter;
    
    NSString            *_loadFileName;
}

+ (CantripWorldDocument *)activeWorld;

// deprecated, use -data
- (NSMutableDictionary *)worldData;
- (NSMutableDictionary *)data;

- (int)incrementChild;
- (void)timerBeat:(id)sender;

- (void)newWorldWindowAction:(id)sender;
- (void)updateVisualSettings:(id)sender;

- (void)loadFromFile:(NSString *)fileName;

@end
